<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<script>
$(function(){
	 $.ajax({
			type:"post",
			url:"${initParam.root}report/selectReport.do",
			datatype:"json",			
			async: false,
			success:function(data){		
				var rankTable = "<tr><td>순위</td><td>검색어</td><td>조회수</td></tr>";
				$.each(data, function(index, value){
						rankTable+="<tr><td>"+value.RANKING+"</td><td>"+value.WORD+"</td><td>"+value.CNT+"</td></tr>";
				});			
				rankTable+="</table>";
				$("#rankTable").html(rankTable);
			}//success
		});//ajax
})
</script>
